package com.ruoyi.quartz.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.quartz.mapper.YyZhouhuibaseMapper;
import com.ruoyi.quartz.domain.YyZhouhuibase;
import com.ruoyi.quartz.service.IYyZhouhuibaseService;

/**
 * YyZhouhuibaseService业务层处理
 * 
 * @author SYF
 * @date 2025-06-10
 */
@Service
public class YyZhouhuibaseServiceImpl implements IYyZhouhuibaseService 
{
    @Autowired
    private YyZhouhuibaseMapper yyZhouhuibaseMapper;

    /**
     * 查询YyZhouhuibase
     * 
     * @param djdate YyZhouhuibase主键
     * @return YyZhouhuibase
     */
    @Override
    public YyZhouhuibase selectYyZhouhuibaseByDjdate(String djdate)
    {
        return yyZhouhuibaseMapper.selectYyZhouhuibaseByDjdate(djdate);
    }

    /**
     * 查询YyZhouhuibase列表
     * 
     * @param yyZhouhuibase YyZhouhuibase
     * @return YyZhouhuibase
     */
    @Override
    public List<YyZhouhuibase> selectYyZhouhuibaseList(YyZhouhuibase yyZhouhuibase)
    {
        return yyZhouhuibaseMapper.selectYyZhouhuibaseList(yyZhouhuibase);
    }

    /**
     * 新增YyZhouhuibase
     * 
     * @param yyZhouhuibase YyZhouhuibase
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int insertYyZhouhuibase(YyZhouhuibase yyZhouhuibase)
    {
        return yyZhouhuibaseMapper.insertYyZhouhuibase(yyZhouhuibase);
    }

    /**
     * 修改YyZhouhuibase
     * 
     * @param yyZhouhuibase YyZhouhuibase
     * @return 结果
     */
    @Override
    public int updateYyZhouhuibase(YyZhouhuibase yyZhouhuibase)
    {
        return yyZhouhuibaseMapper.updateYyZhouhuibase(yyZhouhuibase);
    }

    /**
     * 批量删除YyZhouhuibase
     * 
     * @param djdates 需要删除的YyZhouhuibase主键
     * @return 结果
     */
    @Override
    public int deleteYyZhouhuibaseByDjdates(String[] djdates)
    {
        return yyZhouhuibaseMapper.deleteYyZhouhuibaseByDjdates(djdates);
    }

    /**
     * 删除YyZhouhuibase信息
     * 
     * @param djdate YyZhouhuibase主键
     * @return 结果
     */
    @Override
    public int deleteYyZhouhuibaseByDjdate(String djdate)
    {
        return yyZhouhuibaseMapper.deleteYyZhouhuibaseByDjdate(djdate);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int deleteYyZhouhuibaseByYear(String ym){
        return yyZhouhuibaseMapper.deleteYyZhouhuibaseByYear(ym);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectZhouhuiBaseData(String year){
        return yyZhouhuibaseMapper.selectZhouhuiBaseData(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectLyUserBalance(){
        return yyZhouhuibaseMapper.selectLyUserBalance();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectUserInfoByUid(String uid){
        return yyZhouhuibaseMapper.selectUserInfoByUid(uid);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectBalanceByUid(String uid){
        return yyZhouhuibaseMapper.selectBalanceByUid(uid);
    }
}
